#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define STR_LEN 10
#define TIME_LEN 20
#define PASSWORD_LEN 10
#define DEFAULT_CAPACITY 2
#define KEY "123456"  //  !!management password!!
#define INC_SIZE 2
#define BuyInfoSize 20

struct StationInfo
{
	char stationID[STR_LEN];
	char start[STR_LEN];
	char end[STR_LEN];
	int price;
	int numbers;
	char time[TIME_LEN];
};

typedef struct StationInfo StationInfo;

struct Station
{
	StationInfo* data;
	int size;
	int capacity;
};

typedef struct Station Station;

struct client
{
	char clientName[STR_LEN];
	char stationID[STR_LEN];
	char start[STR_LEN];
	char end[STR_LEN];
	int price;
	int numbers;
	char time[TIME_LEN];
};

typedef struct client client;

struct BuyInfo
{
	client data[50];
	int size;
};

typedef struct BuyInfo BuyInfo;

/*Functions for TBS.c*/

int Menu();  //Dispkay function chioces

void TicketSelling(Station* p, BuyInfo* q); //Enter Tickets selling block

void SystemManage(Station* p, BuyInfo* q);  //Enter System management block

void InitialData(Station* p);  //Initialize data and load data from local if is needed

void ExitProgram(Station* p);  //save data, free memory and exit
